package cn.wen.eeayjoke.adapter.home;

import java.util.ArrayList;
import java.util.List;

import cn.wen.base.adapter.recyclerview.QuickRecyclerViewHolder;
import cn.wen.base.adapter.recyclerview.QuickVAdapter;
import cn.wen.base.vlayout.layout.LinearLayoutHelper;
import cn.wen.eeayjoke.R;
import cn.wen.eeayjoke.entity.bean.home.IndexTopicItems;
import cn.wen.eeayjoke.utils.ItemTypes;

/**
 * 标题
 */

public class SubTitleAdapter extends QuickVAdapter<IndexTopicItems> {
    public SubTitleAdapter(IndexTopicItems item) {
        List<IndexTopicItems> data = new ArrayList<>();
        data.add(item);
        setData(data);
        setLayoutHelper(new LinearLayoutHelper());
        setLayoutId(R.layout.main_sub_title);
    }

    @Override
    protected void convert(QuickRecyclerViewHolder holder, IndexTopicItems item, int position) {
        holder.displayImage(R.id.iv_tab_icon, item.pic_path, R.drawable.transparent);
    }

    @Override
    public int getItemViewType(int position) {
        return ItemTypes.TYPE_SUB_TITLE;
    }
}
